	.file	"main.c"
	.comm	globalArgs,28,4
	.section	.rodata
.LC0:
	.string	"vho:m:"
	.data
	.align 4
	.type	optString, @object
	.size	optString, 4
optString:
	.long	.LC0
	.section	.rodata
.LC1:
	.string	"version"
.LC2:
	.string	"help"
.LC3:
	.string	"output"
.LC4:
	.string	"max"
	.align 32
	.type	longOpts, @object
	.size	longOpts, 64
longOpts:
	.long	.LC1
	.long	0
	.long	0
	.long	118
	.long	.LC2
	.long	0
	.long	0
	.long	104
	.long	.LC3
	.long	1
	.long	0
	.long	111
	.long	.LC4
	.long	1
	.long	0
	.long	109
	.text
.globl extender_linea
	.type	extender_linea, @function
extender_linea:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$40, %esp
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	strlen
	movl	%eax, -16(%ebp)
	movl	12(%ebp), %edx
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	realloc
	movl	%eax, %edx
	movl	8(%ebp), %eax
	movl	%edx, (%eax)
	movl	-16(%ebp), %eax
	movl	%eax, -12(%ebp)
	jmp	.L2
.L3:
	movl	8(%ebp), %eax
	movl	(%eax), %edx
	movl	-12(%ebp), %eax
	leal	(%edx,%eax), %eax
	movb	$0, (%eax)
	addl	$1, -12(%ebp)
.L2:
	movl	-12(%ebp), %eax
	cmpl	12(%ebp), %eax
	jl	.L3
	leave
	ret
	.size	extender_linea, .-extender_linea
	.section	.rodata
.LC5:
	.string	"line: %d - Cols:%d"
.LC6:
	.string	",%d"
.LC7:
	.string	"line: %d - Cols:0"
.LC8:
	.string	"line: %d - Cols:all line\n"
.LC9:
	.string	".\n"
	.text
.globl comparar_linea_y_loggear
	.type	comparar_linea_y_loggear, @function
comparar_linea_y_loggear:
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%ebx
	subl	$52, %esp
	movl	$1, -36(%ebp)
	movl	$1, -40(%ebp)
	movl	12(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	strlen
	movl	%eax, %ebx
	movl	16(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	strlen
	cmpl	%eax, %ebx
	jbe	.L6
	movl	12(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	strlen
	movl	%eax, -12(%ebp)
	movl	-12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	16(%ebp), %eax
	movl	%eax, (%esp)
	call	extender_linea
	jmp	.L7
.L6:
	movl	16(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	strlen
	movl	%eax, -12(%ebp)
	movl	-12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	12(%ebp), %eax
	movl	%eax, (%esp)
	call	extender_linea
.L7:
	movl	12(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, -16(%ebp)
	movl	16(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, -20(%ebp)
	movl	$0, -24(%ebp)
	jmp	.L8
.L20:
	movl	-24(%ebp), %eax
	addl	-16(%ebp), %eax
	movzbl	(%eax), %edx
	movl	-24(%ebp), %eax
	addl	-20(%ebp), %eax
	movzbl	(%eax), %eax
	cmpb	%al, %dl
	je	.L9
	cmpl	$0, -36(%ebp)
	jne	.L10
	cmpl	$0, -40(%ebp)
	je	.L11
	movl	$.LC5, %eax
	movl	-24(%ebp), %edx
	movl	%edx, 12(%esp)
	movl	20(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	$0, -40(%ebp)
	jmp	.L12
.L11:
	movl	$.LC6, %eax
	movl	-24(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
.L12:
	movl	globalArgs, %eax
	subl	$1, %eax
	movl	%eax, globalArgs
	movl	globalArgs, %eax
	testl	%eax, %eax
	jne	.L10
	jmp	.L13
.L9:
	cmpl	$0, -36(%ebp)
	je	.L10
	movl	-24(%ebp), %eax
	addl	-16(%ebp), %eax
	movzbl	(%eax), %eax
	cmpb	$10, %al
	jne	.L14
	movl	-24(%ebp), %eax
	addl	-20(%ebp), %eax
	movzbl	(%eax), %eax
	cmpb	$10, %al
	jne	.L14
	cmpl	$0, -24(%ebp)
	jne	.L28
	movl	$0, -36(%ebp)
	addl	$1, -24(%ebp)
	jmp	.L13
.L14:
	movl	$0, -36(%ebp)
	cmpl	$0, -24(%ebp)
	je	.L16
	movl	$.LC7, %eax
	movl	20(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	$0, -40(%ebp)
	movl	globalArgs, %eax
	subl	$1, %eax
	movl	%eax, globalArgs
	movl	globalArgs, %eax
	testl	%eax, %eax
	je	.L29
.L16:
	movl	$1, -28(%ebp)
	jmp	.L17
.L19:
	movl	$.LC6, %eax
	movl	-28(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	globalArgs, %eax
	subl	$1, %eax
	movl	%eax, globalArgs
	movl	globalArgs, %eax
	testl	%eax, %eax
	je	.L30
.L18:
	addl	$1, -28(%ebp)
.L17:
	movl	-28(%ebp), %eax
	cmpl	-24(%ebp), %eax
	jl	.L19
	jmp	.L10
.L30:
	nop
.L10:
	addl	$1, -24(%ebp)
.L8:
	movl	-24(%ebp), %eax
	cmpl	-12(%ebp), %eax
	jl	.L20
	jmp	.L13
.L28:
	nop
	jmp	.L13
.L29:
	nop
.L13:
	cmpl	$0, -36(%ebp)
	je	.L21
	movl	globalArgs+24, %eax
	cmpl	$1, %eax
	jne	.L22
	movl	globalArgs, %eax
	cmpl	-12(%ebp), %eax
	jl	.L23
	movl	$.LC8, %eax
	movl	20(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	globalArgs, %eax
	subl	-12(%ebp), %eax
	movl	%eax, globalArgs
	jmp	.L21
.L23:
	movl	$.LC7, %eax
	movl	20(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	globalArgs, %eax
	movl	%eax, -32(%ebp)
	movl	-32(%ebp), %eax
	subl	$1, %eax
	movl	%eax, globalArgs
	jmp	.L24
.L25:
	movl	globalArgs, %eax
	movl	-32(%ebp), %edx
	subl	%eax, %edx
	movl	$.LC6, %eax
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	globalArgs, %eax
	subl	$1, %eax
	movl	%eax, globalArgs
.L24:
	movl	globalArgs, %eax
	testl	%eax, %eax
	jg	.L25
	movl	$.LC9, %eax
	movl	8(%ebp), %edx
	movl	%edx, 12(%esp)
	movl	$2, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	jmp	.L21
.L22:
	movl	$.LC8, %eax
	movl	20(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
.L21:
	cmpl	$0, -40(%ebp)
	jne	.L27
	movl	$.LC9, %eax
	movl	8(%ebp), %edx
	movl	%edx, 12(%esp)
	movl	$2, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
.L27:
	addl	$52, %esp
	popl	%ebx
	popl	%ebp
	ret
	.size	comparar_linea_y_loggear, .-comparar_linea_y_loggear
	.section	.rodata
	.align 4
.LC10:
	.ascii	"Usage:\n\n"
	.string	"diff [options] from-file to-file\ndiff - find differences between two files\n\nOptions:\n  -v, --version\tPrint version and quit.\n  -h, --help\tPrint this information and quit.\n  -o, --output\tSpecifies the output file.\n  -m, --max\tShows the first m differences.\n"
	.text
.globl mostrar_ayuda
	.type	mostrar_ayuda, @function
mostrar_ayuda:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$24, %esp
	movl	stdout, %eax
	movl	%eax, %edx
	movl	$.LC10, %eax
	movl	%edx, 12(%esp)
	movl	$264, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	leave
	ret
	.size	mostrar_ayuda, .-mostrar_ayuda
	.section	.rodata
	.align 4
.LC11:
	.string	"diff (TP0 1er cuatrimestre 2011) 1.0.10\n"
	.text
.globl mostrar_version
	.type	mostrar_version, @function
mostrar_version:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$24, %esp
	movl	stdout, %eax
	movl	%eax, %edx
	movl	$.LC11, %eax
	movl	%edx, 12(%esp)
	movl	$40, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	leave
	ret
	.size	mostrar_version, .-mostrar_version
	.section	.rodata
.LC12:
	.string	"Solo en archivo %s: %d"
	.text
.globl imprimir_lineas_sobrantes
	.type	imprimir_lineas_sobrantes, @function
imprimir_lineas_sobrantes:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$40, %esp
	movl	20(%ebp), %edx
	addl	$1, 20(%ebp)
	movl	$.LC12, %eax
	movl	%edx, 12(%esp)
	movl	16(%ebp), %edx
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	12(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	jmp	.L36
.L37:
	movl	20(%ebp), %edx
	addl	$1, 20(%ebp)
	movl	$.LC6, %eax
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	12(%ebp), %eax
	movl	%eax, (%esp)
	call	fprintf
	movl	-12(%ebp), %eax
	movl	%eax, (%esp)
	call	free
.L36:
	leal	-12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	leerlinea
	cmpl	$-1, %eax
	jne	.L37
	movl	$.LC9, %eax
	movl	12(%ebp), %edx
	movl	%edx, 12(%esp)
	movl	$2, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	leave
	ret
	.size	imprimir_lineas_sobrantes, .-imprimir_lineas_sobrantes
.globl parsear_opciones
	.type	parsear_opciones, @function
parsear_opciones:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$56, %esp
	movl	$0, -12(%ebp)
	movl	$0, -16(%ebp)
	movl	optString, %eax
	leal	-16(%ebp), %edx
	movl	%edx, 16(%esp)
	movl	$longOpts, 12(%esp)
	movl	%eax, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	getopt_long
	movl	%eax, -12(%ebp)
	jmp	.L40
.L49:
	movl	-12(%ebp), %eax
	cmpl	$109, %eax
	je	.L44
	cmpl	$109, %eax
	jg	.L47
	cmpl	$63, %eax
	je	.L42
	cmpl	$104, %eax
	je	.L43
	jmp	.L41
.L47:
	cmpl	$111, %eax
	je	.L45
	cmpl	$118, %eax
	je	.L46
	jmp	.L41
.L44:
	movl	optarg, %eax
	movl	%eax, (%esp)
	call	atoi
	movl	%eax, globalArgs
	movl	$1, globalArgs+24
	jmp	.L41
.L45:
	movl	optarg, %eax
	movl	%eax, globalArgs+8
	jmp	.L41
.L46:
	movl	$1, globalArgs+16
	jmp	.L41
.L43:
	movl	$1, globalArgs+20
	jmp	.L41
.L42:
	movl	$1, %eax
	jmp	.L48
.L41:
	movl	optString, %eax
	leal	-16(%ebp), %edx
	movl	%edx, 16(%esp)
	movl	$longOpts, 12(%esp)
	movl	%eax, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	getopt_long
	movl	%eax, -12(%ebp)
.L40:
	cmpl	$-1, -12(%ebp)
	jne	.L49
	movl	optind, %eax
	sall	$2, %eax
	addl	12(%ebp), %eax
	movl	%eax, globalArgs+12
	movl	$0, %eax
.L48:
	leave
	ret
	.size	parsear_opciones, .-parsear_opciones
	.section	.rodata
.LC13:
	.string	"rt"
	.text
.globl open_files
	.type	open_files, @function
open_files:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$24, %esp
	movl	$.LC13, %edx
	movl	globalArgs+12, %eax
	movl	(%eax), %eax
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	fopen
	movl	8(%ebp), %edx
	movl	%eax, (%edx)
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	testl	%eax, %eax
	jne	.L52
	movl	$1, %eax
	jmp	.L53
.L52:
	movl	$.LC13, %edx
	movl	globalArgs+12, %eax
	addl	$4, %eax
	movl	(%eax), %eax
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	fopen
	movl	12(%ebp), %edx
	movl	%eax, (%edx)
	movl	12(%ebp), %eax
	movl	(%eax), %eax
	testl	%eax, %eax
	jne	.L54
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, (%esp)
	call	fclose
	movl	$1, %eax
	jmp	.L53
.L54:
	movl	$0, %eax
.L53:
	leave
	ret
	.size	open_files, .-open_files
	.section	.rodata
.LC14:
	.string	"wt"
	.text
.globl open_output_file
	.type	open_output_file, @function
open_output_file:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$24, %esp
	movl	globalArgs+8, %eax
	testl	%eax, %eax
	jne	.L57
	movl	stdout, %edx
	movl	8(%ebp), %eax
	movl	%edx, (%eax)
	jmp	.L58
.L57:
	movl	$.LC14, %edx
	movl	globalArgs+8, %eax
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	fopen
	movl	8(%ebp), %edx
	movl	%eax, (%edx)
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	testl	%eax, %eax
	jne	.L58
	movl	stdout, %edx
	movl	8(%ebp), %eax
	movl	%edx, (%eax)
	movl	$1, %eax
	jmp	.L59
.L58:
	movl	$0, %eax
.L59:
	leave
	ret
	.size	open_output_file, .-open_output_file
.globl inicializar_arg
	.type	inicializar_arg, @function
inicializar_arg:
	pushl	%ebp
	movl	%esp, %ebp
	movl	$-1, globalArgs
	movl	$0, globalArgs+4
	movl	$0, globalArgs+12
	movl	$0, globalArgs+8
	movl	$0, globalArgs+16
	movl	$0, globalArgs+20
	movl	$0, globalArgs+24
	popl	%ebp
	ret
	.size	inicializar_arg, .-inicializar_arg
	.section	.rodata
	.align 4
.LC15:
	.string	"Error: Se deben especificar dos archivos para comparar\n"
	.align 4
.LC16:
	.string	"Error: No se pudo de abrir el/los archivo/s de entrada\n"
	.align 4
.LC17:
	.string	"Error: No se pudo de abrir el archivo de salida.\n"
	.text
.globl main
	.type	main, @function
main:
	pushl	%ebp
	movl	%esp, %ebp
	andl	$-16, %esp
	pushl	%ebx
	subl	$60, %esp
	movl	$0, 24(%esp)
	movl	$0, 20(%esp)
	movl	$0, 16(%esp)
	call	inicializar_arg
	leal	36(%esp), %eax
	movl	%eax, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	parsear_opciones
	testl	%eax, %eax
	je	.L64
	movl	$1, %eax
	jmp	.L65
.L64:
	movl	globalArgs, %eax
	testl	%eax, %eax
	jne	.L66
	movl	$0, %eax
	jmp	.L65
.L66:
	movl	globalArgs+20, %eax
	testl	%eax, %eax
	je	.L67
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	call	mostrar_ayuda
	movl	$0, %eax
	jmp	.L65
.L67:
	movl	globalArgs+16, %eax
	testl	%eax, %eax
	je	.L68
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	call	mostrar_version
	movl	$0, %eax
	jmp	.L65
.L68:
	movl	optind, %eax
	movl	8(%ebp), %edx
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	cmpl	$2, %eax
	je	.L69
	movl	stderr, %eax
	movl	%eax, %edx
	movl	$.LC15, %eax
	movl	%edx, 12(%esp)
	movl	$55, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	movl	$1, %eax
	jmp	.L65
.L69:
	leal	40(%esp), %eax
	movl	%eax, 4(%esp)
	leal	44(%esp), %eax
	movl	%eax, (%esp)
	call	open_files
	testl	%eax, %eax
	je	.L70
	movl	stderr, %eax
	movl	%eax, %edx
	movl	$.LC16, %eax
	movl	%edx, 12(%esp)
	movl	$55, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	movl	$1, %eax
	jmp	.L65
.L70:
	leal	36(%esp), %eax
	movl	%eax, (%esp)
	call	open_output_file
	testl	%eax, %eax
	je	.L71
	movl	stderr, %eax
	movl	%eax, %edx
	movl	$.LC17, %eax
	movl	%edx, 12(%esp)
	movl	$49, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	fwrite
	movl	44(%esp), %eax
	movl	%eax, (%esp)
	call	fclose
	movl	40(%esp), %eax
	movl	%eax, (%esp)
	call	fclose
	movl	$1, %eax
	jmp	.L65
.L71:
	movl	44(%esp), %eax
	leal	32(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	leerlinea
	movl	%eax, 24(%esp)
	movl	40(%esp), %eax
	leal	28(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	leerlinea
	movl	%eax, 20(%esp)
	jmp	.L72
.L75:
	movl	36(%esp), %eax
	movl	16(%esp), %edx
	movl	%edx, 12(%esp)
	leal	28(%esp), %edx
	movl	%edx, 8(%esp)
	leal	32(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	comparar_linea_y_loggear
	addl	$1, 16(%esp)
	movl	32(%esp), %eax
	movl	%eax, (%esp)
	call	free
	movl	28(%esp), %eax
	movl	%eax, (%esp)
	call	free
	movl	globalArgs, %eax
	testl	%eax, %eax
	je	.L80
.L73:
	movl	44(%esp), %eax
	leal	32(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	leerlinea
	movl	%eax, 24(%esp)
	movl	40(%esp), %eax
	leal	28(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	leerlinea
	movl	%eax, 20(%esp)
.L72:
	cmpl	$-1, 24(%esp)
	je	.L74
	cmpl	$-1, 20(%esp)
	jne	.L75
	jmp	.L74
.L80:
	nop
.L74:
	cmpl	$-1, 24(%esp)
	jne	.L76
	cmpl	$-1, 20(%esp)
	je	.L77
.L76:
	movl	globalArgs, %eax
	testl	%eax, %eax
	je	.L77
	cmpl	$-1, 24(%esp)
	jne	.L78
	movl	28(%esp), %eax
	movl	%eax, (%esp)
	call	free
	movl	globalArgs+12, %eax
	addl	$4, %eax
	movl	(%eax), %ecx
	movl	36(%esp), %edx
	movl	40(%esp), %eax
	movl	16(%esp), %ebx
	movl	%ebx, 12(%esp)
	movl	%ecx, 8(%esp)
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	imprimir_lineas_sobrantes
	jmp	.L77
.L78:
	movl	32(%esp), %eax
	movl	%eax, (%esp)
	call	free
	movl	globalArgs+12, %eax
	movl	(%eax), %ecx
	movl	36(%esp), %edx
	movl	44(%esp), %eax
	movl	16(%esp), %ebx
	movl	%ebx, 12(%esp)
	movl	%ecx, 8(%esp)
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	imprimir_lineas_sobrantes
.L77:
	movl	44(%esp), %eax
	movl	%eax, (%esp)
	call	fclose
	movl	40(%esp), %eax
	movl	%eax, (%esp)
	call	fclose
	movl	$0, %eax
.L65:
	addl	$60, %esp
	popl	%ebx
	movl	%ebp, %esp
	popl	%ebp
	ret
	.size	main, .-main
	.ident	"GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5"
	.section	.note.GNU-stack,"",@progbits
